package com.reebake.ideal.user.service;

import com.reebake.ideal.user.entity.UserCredential;
import com.reebake.ideal.user.entity.UserInfo;

public interface UserAuthService {

    public UserCredential queryByUsername(String username);

    public UserCredential queryByUserId(String userId);

    public UserCredential queryByPhoneNumber(String phoneNumber);

    public UserCredential queryByEmail(String email);

    public UserCredential queryByThirdParty(String uuid, String source);

    public boolean existsByUsername(String username);

    public boolean existsByPhoneNumber(String phoneNumber);

    public boolean existsByEmail(String email);

    public boolean existsByThirdParty(String uuid, String source);;

    public String registerByUsername(String username, String password);

    public String registerByPhoneNumber(String phoneNumber, String verifyCode);

    public String registerByEmail(String email, String verifyCode);

    public void saveCredentialByUsername(String userId, String username, String password);

    public void saveCredentialByPhoneNumber(String userId, String phoneNumber, String verifyCode);

    public void saveCredentialByEmail(String userId, String email, String verifyCode);

    public String register(UserInfo userInfo, UserCredential userCredential);

    public void resetPassword(String username, String verifyCode, String password);

    public void bindThirdPartyUser(String userId, String uuid, String source);

    public void changeUsername(String userId, String password, String newUsername);

    public void changePassword(String userId, String password, String newPassword);

    public void changePhoneNumber(String userId, String verifyCode, String newPhoneNumber, String newVerifyCode);

    public void deleteUser(String userId);

    public void lockByUserId(String userId);
}
